package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/11/29 16:03
 **/
@Getter
@AllArgsConstructor
public enum VideoTopTypeEnum {
    NO_TOP(0, "非置顶"),
    TOP(1, "置顶")
    ;

    private Integer code;

    private String desc;

    public static VideoTopTypeEnum getEnumByCode(Integer code) {
        for (VideoTopTypeEnum e : VideoTopTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
